//引入配置好的axios

import request from './http'
import requests from './https'
import requests1 from './index'
import qs from 'qs'; 



//非遗档案文献   

export const getyear = params => { return request({ url: '/literature/index/statistics_year', method: 'get', params }) }
//地区
export const getdiqu = params => { return request({ url: '/literature/index/dq_list', method: 'get', params }) }
//批次对照
export const getpicidz = params => { return request({ url: '/literature/index/piciList', method: 'get', params }) }

//年份数量全部 
export const getyearmax = data => { return request({ url: '/literature/search/searchSourceNumGroupByYear', method: 'post', data:qs.stringify(data)}) }
export const getyearleibie = data => { return requests({ url: '/literature/search/searchStatistics', method: 'post', data:data}) }


export const getml = params => { return request({ url: '/literature/index/statistics_ml', method: 'get', params }) }
export const getjb = params => { return request({ url: '/literature/index/statistics_jibie', method: 'get', params }) }

export const getjiedian = params => { return request({ url: '/literature/index/literature_type_list', method: 'get', params }) }
export const getjiedian1 = params => { return request({ url: 'literature/index/literature_type_list_all', method: 'get', params }) }

//登录 
export const getLogin = params => { return requests1({ url: '/literature/user/login', method: 'get', params }) }
export const getLogout = params => { return requests1({ url: '/literature/user/regist', method: 'get', params }) }
//退出登录
export const gettuichu = params => { return request({ url: '/literature/user/logout', method: 'get', params }) }
//书籍列表 
export const getBook = data => { return requests({ url: '/literature/search/searchBook', method: 'post', data:data}) }
//书籍详情
export const getBookXq = data => { return request({ url: '/literature/search/bookDetail', method: 'post', data:qs.stringify(data)}) }
//书籍按单项类别
export const getbookdan = data => { return requests({ url: '/literature/search/searchBookByType', method: 'post', data:data}) }

//普查档案
export const getPc = data => { return requests({ url: '/literature/search/pc/searchPc', method: 'post', data:data}) }
//单项筛选
export const getdxsx = data => { return requests({ url: '/literature/search/pc/searchDigitalArchivesByType', method: 'post', data:data}) }
//数字档案详情 /
export const getszda = data => { return request({ url: '/literature/search/pc/digitalArchivesDetail', method: 'post', data:qs.stringify(data)})  }
// 音像搜索 
export const getyinx = data => { return requests({ url: '/literature/search/media/searchsearchMedia', method: 'post', data:data}) }
//音像详情  
export const getyxxq= data => { return request({ url: '/literature/search/media/mediaArchivesDetail', method: 'post', data:qs.stringify(data)})  }
export const getyxtj= data => { return request({ url: '/literature/search/media/audioRecommend', method: 'post', data:qs.stringify(data)})  }


//单项搜索
export const getyxdx = data => { return requests({ url: '/literature/search/media/searchMediaByType', method: 'post', data:data}) }
//理论 /search/searchAllSource

export const getlilun = data => { return requests({ url: '/literature/search/theory/searchTheory', method: 'post', data:data}) }
export const getlilunxq = data => { return request({ url: '/literature/search/theory/theoryArchivesDetail', method: 'post', data:qs.stringify(data)})  }

//全部 
export const getindex = data => { return requests({ url: '/literature/search/searchAllSource', method: 'post', data:data}) }
//全部新
export const getindexMax = data => { return requests({ url: '/literature/search/searchSource', method: 'post', data:data}) }

//单项搜索
export const getdanxiangll = data => { return requests({ url: '/literature/search/theory/searchTheoryArchivesByType', method: 'post', data:data}) }
//高级检索/search/seniorSearch
export const getgjjs = data => { return requests({ url: '/literature/search/seniorSearch', method: 'post', data:data}) }
//收藏 /user/saveCollect
export const getsc = data => { return requests({ url: '/literature/user/saveCollect', method: 'post', data:data}) }
//取消收藏 
export const getqxsc = params => { return request({ url: '/literature/user/deleteCollect', method: 'get', params }) }

export const geturersc = data => { return request({ url: '/literature/user/myCollect', method: 'post', data:qs.stringify(data)})  }

export const getwxgdxx = params => { return request({ url: '/literature/index/wxgdxx', method: 'get', params }) } //归档信息


//全部 


//增加用户
// export const addUser = data => { return request({ url: '/wechat/ccr/index', method: 'post', data:qs.stringify(data) }) }
//删除用户
// export const delUser = data => { return request({ url: '你的接口地址', method: 'post', data }) }
//修改用户信息
// export const addUserInfo = data => { return request({ url: '你的接口地址', method: 'post', data }) }
//查询用户详细信息
// export const getUserDetail = params => { return request({ url: '你的接口地址', method: 'get', params }) }